﻿using System;
using System.Collections.Generic;
using System.Text;
using Castle.ActiveRecord;
using Castle.Components.Validator;
using MiragePWF.NH.Validation;
using Wolfut.MirageEE.Kernal.Common;
using Wolfut.MirageEE.Domain.CommonUtilities;

namespace Wolfut.MirageEE.Domain.Products
{
    [ActiveRecord("IN_OUT_WAREHOUSE_CATEGORYS")]
    public class InOutWarehouseCategory : PersistentObjectWithGuid
    {
        #region 入出库类别编号
        [Property("IN_OUT_CATEGORY_Code")]
        [ValidateNonEmpty,ValidateLength(0, 100, "入出库类别编号超长")]
        public virtual string InOutCategoryCode
        {
            get
            {
                return inOutCategoryCode;
            }
            set
            {
                inOutCategoryCode = value;
            }
        }
        private string inOutCategoryCode;
        #endregion

        #region 其他入库类别
        [Property("CATEGORY")]
        [ValidateLength(0, 40, "其他入库类别超长")]
        public virtual string Category
        {
            get
            {
                return category;
            }
            set
            {
                category = value;
            }
        }
        private string category;
        #endregion

        #region 存货来源OR转入账户
        [Property("SUPPLIER_CUSTOMER")]
        [ValidateLength(0, 100, "存货来源OR转入账户超长")]
        public virtual string SupplierOrCustomer
        {
            get
            {
                return supplierOrCustomer;
            }
            set
            {
                supplierOrCustomer = value;
            }
        }
        private string supplierOrCustomer;
        #endregion

        #region 入库/出库
        [Property("IS_IN_OUT")]
        [ValidateNonEmpty]
        public virtual bool IsInWarehouse
        {
            get
            {
                return isInWarehouse;
            }
            set
            {
                isInWarehouse = value;
            }
        }
        private bool isInWarehouse;
        #endregion

        #region 参与成本核算
        [Property("JOIN_COST_COUNT")]
        [ValidateNonEmpty]
        public virtual bool JoinCostCount
        {
            get
            {
                return joinCostCount;
            }
            set
            {
                joinCostCount = value;
            }
        }
        private bool joinCostCount;
        #endregion

        #region 是否删除
        [Property("IS_DELETED")]
        [ValidateNonEmpty]
        public virtual bool IsDeleted
        {
            get
            {
                return isDeleted;
            }
            set
            {
                isDeleted = value;
            }
        }
        private bool isDeleted;
        #endregion
    }
}
